#include "KUnPack.h"
#include "KUnpackager.h"
#include "../IUnpackagerUI.h"
#include "../error.h"
using namespace KCS0026;



bool KUnpackager::Init(IUnpackagerUI* pkUI)
{
	bool bEC = false;
	pkUI = NULL;
	return bEC;

}


int KUnpackager::Unpack(const wchar_t* szSrcFile, const wchar_t* szDestFolder)
{
	int nEC = 1;	
	KUnpack kunpack;
	PROCESS_ERROR(szSrcFile);
	PROCESS_ERROR(szDestFolder);
	char chFile[MAX_PATH];
	char chPath[MAX_PATH];
	setlocale(LC_ALL, "chs"); 
	wcstombs(chFile, szSrcFile, MAX_PATH);
	wcstombs(chPath, szDestFolder, MAX_PATH);

	kunpack.UnPackAFile(chFile, chPath);
	nEC = 0;
Exit0:
	return nEC;

}